import "LotroLCD.LotroLCD.UI";

LotroLCDElementWindow = class(LotroLCDWindow);
function LotroLCDElementWindow:Constructor(parent,settings)
	LotroLCDWindow.Constructor(self);
end

-- Handle changes in visibility when triggered by user
function LotroLCDElementWindow:VisibleChanged(sender, args)
	if self:IsVisible() then
		self.placeholder:SetVisible(false);
	else
		self.placeholder:SetVisible(true);
	end
end

-- Handle user moving window around
function LotroLCDElementWindow:PositionChanged(sender, args)
	local x, y = self:GetPosition();
	self.placeholder:SetPosition(x + 29, y + 3);
	self.settings.x = x;
	self.settings.y = y;
	self:SaveSettings();
end